Rendering static content

When your application contains objects that do not have to be rendered for every frame, create a composer that renders such objects only once. Since this causes fill-rate because the dynamic content is always rendered on the pixels that were already filled with the background, the improvement in performance can vary. See Preventing overdraw with sorting filters.

Rendering objects only once

When you want to render objects only once, you have to mark them and them collect them for rendering using one of the following filters: Contains Property Filter, Tag Filter, Object Type Filter, or Property Is Equal Filter.

The following procedure shows how to render objects only once using the Tag Filter.

To render objects only once using Tag Filter:

  1. In the Project select all objects you want to render only once, and in the Properties enter a tag to the Tags property.
    For example, add a tag Render once.
  2. In the Library right-click Composing > Pipeline and select Create > Tag Filter.
    Use this filter to collect all tagged objects.
  3. In the Properties in the Included Tags drop-down menu select the tag you used to tag the objects in the first step.
  4. In the Library right-click Composing > Composers, and in the composer which you use to render your scene create a render pass by selecting Create > Render Pass.
    You need this render pass to render the objects you want to render only once.
  5. In the Properties set the following properties:
    • Object Source to the tag filter you created earlier.
    • Enable the Render Once property.

Rendering layers only once

You can improve the performance of your application by caching the rendering of objects that become static after a certain point. When you set caching on for a layer, this layer generates an FBO for itself, render itself to it, and for all future frames uses this generated FBO instead of rendering itself again. Use this method to cache complex layers and speed up their rendering.

To render layers only once:

  1. In the Project select the layer you want to render only once.
  2. In the Properties click Add Properties, and add any of the following properties:
    • Use Layer Cache Self when object is static or becomes static after a certain point.
    • Use Layer Cache Children when children are static or become static after a certain point.
    • Use Layer Cache Result when the layer itself and all of its children become static after a certain point. Using Layer Cache Result is the fastest way, because it even removes the need to check for self or child caching.

See also

Rendering best practices

Partial rendering

Optimizing rendering of layouts

Setting layers for efficient rendering

Preventing overdraw with sorting filters

Rendering transparent objects

Measuring the performance of your Kanzi application

Best practices